import { pinyin } from 'pinyin-pro'

export function genKey(text: string): string {
  return pinyin(text, { toneType: 'none', separator: '_' })
    .replace(/\s+/g, '_')
    .replace(/[^a-z0-9_]/gi, '')
    .toLowerCase();
}
